﻿<Controls:MetroWindow 
    xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
    x:Class="DownGramer.FeedsScreen"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Feeds"
    Height="736" 
    Width="1280"
    HorizontalContentAlignment="Center" 
    VerticalContentAlignment="Center"
    Background="#FF2D2D30"
    Opacity="1"
    GlowBrush="{DynamicResource AccentColorBrush}"
    WindowStartupLocation="Manual" Name="FScreen" MinWidth="595" MinHeight="713" Loaded="FScreen_Loaded" Closing="FScreen_Closing" Icon="Resources/Images/downgram_icon_64.ico" SizeToContent="Manual" SizeChanged="FScreen_SizeChanged">

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Resources/Icons.xaml" />
            </ResourceDictionary.MergedDictionaries>            
        </ResourceDictionary>
    </Window.Resources>
    
    <Controls:MetroWindow.RightWindowCommands>
        <Controls:WindowCommands>
            <Button Content="" Name="ApplicationVersion" ToolTip="Version" />
            <Button Name="PhotoDestination" PreviewMouseDown="PhotoDestination_PreviewMouseDown" ToolTip="Photo Downloads Destination">
                <StackPanel Orientation="Horizontal">
                    <Rectangle Width="12" Height="10" Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}">
                        <Rectangle.OpacityMask>
                            <VisualBrush Stretch="Fill" Visual="{StaticResource appbar_camera}" />
                        </Rectangle.OpacityMask>
                    </Rectangle>
                    <TextBlock Margin="4 0 0 0"
                   VerticalAlignment="Center"
                   Text="Photos" />
                </StackPanel>
            </Button>
            <Button Name="VideoDestination" PreviewMouseDown="VideoDestination_PreviewMouseDown" ToolTip="Video Downloads Destination">
                <StackPanel Orientation="Horizontal">
                    <Rectangle Width="12" Height="10" Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}">
                        <Rectangle.OpacityMask>
                            <VisualBrush Stretch="Fill" Visual="{StaticResource appbar_video}" />
                        </Rectangle.OpacityMask>
                    </Rectangle>
                    <TextBlock Margin="4 0 0 0"
                   VerticalAlignment="Center"
                   Text="Videos" />
                </StackPanel>
            </Button>
            <Button Content=":(" Name="DownloadStatus" PreviewMouseDown="DownloadStatus_PreviewMouseDown" ToolTip="Downloads Status"/>
            <Button Name="DownloadButton" PreviewMouseDown="DownloadButton_MouseDown" ToolTip="Download Now">
                <StackPanel Orientation="Horizontal">
                    <Rectangle Width="10" Height="10" Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}">
                        <Rectangle.OpacityMask>
                            <VisualBrush Stretch="Fill" Visual="{StaticResource appbar_download}" />
                        </Rectangle.OpacityMask>
                    </Rectangle>
                    <TextBlock Margin="4 0 0 0"
                   VerticalAlignment="Center"
                   Text="Download" />
                </StackPanel>
            </Button>
            <Button Name="LoadOnScrollButton" PreviewMouseDown="LoadOnScrollButton_PreviewMouseDown" >
                <StackPanel Orientation="Horizontal">
                    <Rectangle Width="10" Height="10" Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}" Name="RectangleLoadOnScroll">
                        <Rectangle.OpacityMask>
                            <VisualBrush Stretch="Fill" Visual="{StaticResource appbar_thumbs_down}" />
                        </Rectangle.OpacityMask>
                    </Rectangle>
                    <TextBlock Margin="4 0 0 0"
                   VerticalAlignment="Center"
                   Text="Load On Scroll" />
                </StackPanel>
            </Button>
        </Controls:WindowCommands>
    </Controls:MetroWindow.RightWindowCommands>

    <Canvas Height="679" Name="CanvasCurtain" Width="1258" >
        <Canvas Height="679" Name="CanvasSearch" Width="1258" Panel.ZIndex="1000" KeyDown="CanvasSearch_KeyDown" Visibility="Collapsed">
            <Canvas.Background>
                <SolidColorBrush Color="Black" Opacity="0.9"/>
            </Canvas.Background>
            <StackPanel Orientation="Vertical" Name="StackSearch">
                <StackPanel Orientation="Vertical">
                    <Label Foreground="Gray" Margin="20,3,0,0" Name="LabelHideMe" PreviewMouseDown="LabelHideMe_PreviewMouseDown" MouseEnter="LabelHideMe_MouseEnter" MouseLeave="LabelHideMe_MouseLeave" Height="29">
                        <Label.Content>
                            hit me to close!
                        </Label.Content>
                    </Label>
                    <Label Content="Search for awesome people!" FontSize="36" FontFamily="Tahoma" Foreground="White" Margin="20, 5" Target="{Binding}" Name="SearchHead"/>
                </StackPanel>
                
                <StackPanel Orientation="Horizontal">
                    <TextBox Width="700" Height="69" Margin="20,0,0,0" Name="TextBoxSearch" FontFamily="Segoe UI Symbol" FontSize="36" Padding="5" Foreground="Gray" BorderThickness="0,0,0,5" Background="Transparent" KeyDown="TextBoxSearch_KeyDown">
                        
                    </TextBox>
                </StackPanel>

                <ScrollViewer Height="500" Name="ScrollViewerSearch"  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CanContentScroll="False" Background="Transparent" Margin="0,9,0,0">
                    <WrapPanel Height="Auto" Name="WrapPanelSearch" Width="1197" Background="Transparent" Visibility="Visible" >
                        <Controls:ProgressRing Name="ProgressRingSearch" IsActive="True" Margin="587,223,0,0" Visibility="Collapsed"/>
                    </WrapPanel>
                </ScrollViewer>
            </StackPanel>
        </Canvas>

        <Canvas Canvas.Left="12" Canvas.Top="12" Height="40" Name="CanvasMenu" Width="1234" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0" >
            <StackPanel Orientation="Horizontal" Canvas.Left="816" Canvas.Top="6" Name="StackMenu">
                <Label Canvas.Left="816" Canvas.Top="6" Content="FEED" Height="28" Name="LabelFeed" Foreground="Cyan" Width="Auto" FontWeight="Normal" Margin="0,0,0,0" MouseDown="LabelMenu_MouseDown" />
                <Label Canvas.Left="860" Canvas.Top="6" Content="UPLOADS" Height="28" Name="LabelUploads" Foreground="#FFD8C7C7" Margin="0,0,0,0" MouseDown="LabelMenu_MouseDown" />
                <Label Canvas.Left="928" Canvas.Top="6" Content="FAVORITES" Height="28" Name="LabelFavorites" Foreground="#FFD8C7C7" FontWeight="Normal" MouseDown="LabelMenu_MouseDown" Margin="0,0,0,0" />
                <Label Canvas.Left="1070" Canvas.Top="6" Content="DOWNLOADS" Height="28" Name="LabelDownloads" Foreground="#FFD8C7C7" MouseDown="LabelMenu_MouseDown" />
                <Button Canvas.Left="12" Canvas.Top="7" Content="Load More" Height="23" Name="ButtonLoadMore" Width="75" IsEnabled="True" Click="ButtonLoadMore_Click" Foreground="#FFCCCCCC" BorderBrush="{x:Null}" BorderThickness="0" MouseEnter="ButtonLoadMore_MouseEnter" MouseLeave="ButtonLoadMore_MouseLeave" Visibility="Collapsed">
                    <Button.Background>
                        <SolidColorBrush />
                    </Button.Background>
                </Button>
                <Label Canvas.Left="1003" Canvas.Top="6" Content="POPULAR" Height="28" Name="LabelPopular" Foreground="#FFD8C7C7" Margin="0,0,0,0" MouseDown="LabelMenu_MouseDown" />
                <Label Canvas.Left="1155" Canvas.Top="6" Content="SEARCH" Height="28" Name="LabelSearch" Foreground="#FFD8C7C7" MouseDown="LabelMenu_MouseDown" />
                <Label Canvas.Left="734" Canvas.Top="6" Content="SHOW FAVS" Height="28" Name="LabelShowFavs" Foreground="White" MouseDown="LabelMenu_MouseDown" Visibility="Collapsed"/>
            </StackPanel>
        </Canvas>
        
        <!-- feeds -->
        <Canvas Canvas.Left="12" Canvas.Top="58" Height="609" Name="CanvasFeeds" Width="1234" Visibility="Visible">
            <ScrollViewer Height="609" Name="ScrollViewerFeeds" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CanContentScroll="False" ScrollChanged="ScrollViewerFeeds_ScrollChanged">
                <WrapPanel Height="Auto" Name="WrapPanelFeeds" Width="1197" Background="White" Visibility="Visible" >
                    <Controls:ProgressRing Name="ProgressRingFeeds" IsActive="True" Margin="587,273,0,0" Visibility="Visible"/>
                </WrapPanel>
            </ScrollViewer>
        </Canvas>

        <!-- uploads -->
        <Canvas Canvas.Left="12" Canvas.Top="58" Height="609" Name="CanvasUploads" Width="1234" Visibility="Collapsed">
            <ScrollViewer Height="609" Name="ScrollViewerUploads" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CanContentScroll="False" ScrollChanged="ScrollViewerUploads_ScrollChanged" >
                <WrapPanel Height="Auto" Name="WrapPanelUploads" Width="1197" Background="White" Visibility="Visible" >
                    <Controls:ProgressRing Name="ProgressRingUploads" IsActive="True" Margin="587,273,0,0" Visibility="Visible"/>
                </WrapPanel>
            </ScrollViewer>
        </Canvas>
        
        <!-- popular -->
        <Canvas Canvas.Left="12" Canvas.Top="58" Height="609" Name="CanvasPopular" Width="1234" Visibility="Collapsed">
            <ScrollViewer Height="609" Name="ScrollViewerPopular" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CanContentScroll="False" ScrollChanged="ScrollViewerPopular_ScrollChanged">
                <WrapPanel Height="Auto" Name="WrapPanelPopular" Width="1197" Background="White" Visibility="Visible" >
                    <Controls:ProgressRing Name="ProgressRingPopular" IsActive="True" Margin="587,273,0,0" Visibility="Visible"/>
                </WrapPanel>
            </ScrollViewer>
        </Canvas>

        <!-- favorites -->
        <Canvas Canvas.Left="12" Canvas.Top="58" Height="609" Name="CanvasFavorites" Width="1234" Visibility="Collapsed">
            <ScrollViewer Height="609" Name="ScrollViewerFavorites" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CanContentScroll="False" ScrollChanged="ScrollViewerFavorites_ScrollChanged">
                <WrapPanel Height="Auto" Name="WrapPanelFavorites" Width="1197" Background="White" Visibility="Visible" >
                    <Controls:ProgressRing Name="ProgressRingFavorites" IsActive="True" Margin="587,273,0,0" Visibility="Visible"/>
                </WrapPanel>
            </ScrollViewer>
        </Canvas>

        <!-- downloads -->
        <Canvas Canvas.Left="12" Canvas.Top="58" Height="609" Name="CanvasDownloads" Width="1234" Visibility="Collapsed">
            <ScrollViewer Height="609" Name="ScrollViewerDownloads" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CanContentScroll="False" >
                <WrapPanel Height="Auto" Name="WrapPanelDownloads" Width="1197" Background="White" Visibility="Visible" >
                    <Controls:Tile FontSize="60" Width="392" Height="170" FontFamily="Segoe UI Light" Title="nothing to download" Name="DefaultDownloadTile" Background="LightGray">
                        :(
                    </Controls:Tile>
                </WrapPanel>
            </ScrollViewer>
        </Canvas>

        <!-- favorites list -->
        <Canvas Height="609" Width="8" Canvas.Left="958" Canvas.Top="58" Name="CanvasFavsBar" Background="Black" Visibility="Collapsed"></Canvas>
        <Canvas Height="609" Width="255" Canvas.Left="966" Canvas.Top="58" Name="CanvasFavoritesList" Visibility="Collapsed">
            <Canvas.Background>
                <SolidColorBrush Color="Black" Opacity="0.9"/>
            </Canvas.Background>
            <ScrollViewer Height="609" Name="ScrollViewerFavoritesList" VerticalScrollBarVisibility="Hidden" Canvas.Left="0" Width="250" Margin="3, 0, 0, 0"> 
                <WrapPanel Height="Auto" Name="WrapPanelFavoritesList" Width="250" Background="Transparent" Visibility="Visible">
                    <TextBlock Width="240" Margin="5" Foreground="White" FontFamily="Segoe UI" FontSize="20">
                        my favorites
                    </TextBlock>
                    <TextBlock Width="226" Margin="10, 30, 0, 0" Foreground="LightGray" FontFamily="Segoe UI" FontSize="15" TextWrapping="Wrap" Name="FavoriteListLonelyText">
                        it's all lonely in here! search people and add them to your favorites
                    </TextBlock>
                </WrapPanel>
            </ScrollViewer>
        </Canvas>
    </Canvas>
    
</Controls:MetroWindow>